package com.karrysong.answerapplication.activities;


import android.widget.EditText;
import android.widget.TextView;

import com.karrysong.answerapplication.R;
import com.karrysong.answerapplication.constants.SPkey;
import com.karrysong.answerapplication.utils.SPUtils;

import butterknife.BindView;

public class UserActivity extends BaseActivity {

    @BindView(R.id.userName)
    TextView usernamev;
    @BindView(R.id.userNick)
    EditText usernickv;
    @BindView(R.id.userEmail)
    EditText emailv;
    @BindView(R.id.userPhone)
    EditText phonev;


    @Override
    int getLayoutId() {
        return R.layout.activity_user;
    }

    @Override
    void initData() {
        super.initData();

        String username = (String) SPUtils.get(this, SPkey.UserName, "");
        String nickname = (String) SPUtils.get(this, "nickname", "");
        String email = (String) SPUtils.get(this, "email", "");
        String phone = (String) SPUtils.get(this, "phone", "");
        usernamev.setText(username);
        usernickv.setText(nickname);
        emailv.setText(email);
        phonev.setText(phone);
    }
}